import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Vector;

class ListOfNumbers {
	private Vector victor;
	private static final int size = 10;
	public ListOfNumbers() {
		victor = new Vector<Integer>(size);
		for (int i=0; i<size; i++)
			victor.addElement(new Integer(i));
	}
	
	public void writeList() {
		PrintWriter out = null;
		
		try {
			out = new PrintWriter(new FileWriter("OutFile.txt"));
			for (int i = 0; i < size; i++)
				out.println("Value at : " + victor.elementAt(i));
		} catch (IOException e) {
			// TODO: handle exception
		}finally{
			if ( out != null){
				out.close();
			}else{
				System.out.println("File has not been created!");
			}
				
		}
		out.close();
	}
	
}
